<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    
    <ui:composition template="/index.xhtml">
        <ui:define name="body">
            <div style="width: 250px; background-color: #F4F4F4; border: 1px solid #e5e5e5; margin: 2% auto; padding: 2%;">
                <h:form id="LoginForm"> 
                    <h:panelGroup id="logo">
                        <p align="center"><img src="/embrapa/faces/i_logo.png" alt=""/></p>
                    </h:panelGroup>
                    <h:panelGroup id="display">
                        <p align="center">Digite seus dados para fazer login</p>
                        <p:panelGrid columns="2" style="background-color: #F4F4F4; border: none;">
                            <p:outputLabel value="#{bundle.CreateUsuarioLabel_login}" for="loginLogin"/>
                            <p:inputText id="loginLogin" value="#{usuarioController.selected.login}" title="#{bundle.CreateUsuarioTitle_login}" required="true" requiredMessage="#{bundle.CreateUsuarioRequiredMessage_login}" valueChangeListener="admin" />
                            <p:outputLabel value="#{bundle.CreateUsuarioLabel_senha}" for="senhaSenha" />
                            <p:password id="senhaSenha" value="#{usuarioController.selected.senha}" title="#{bundle.CreateUsuarioTitle_senha}" required="true" requiredMessage="#{bundle.CreateUsuarioRequiredMessage_senha}" />
                        </p:panelGrid>
                        <p:commandButton actionListener="#{usuarioController.Login}" value="Entrar" update="display,:growl" />
                        <p align="center">Use seu usuário e senha da rede(LDAP)</p>    
                    </h:panelGroup>
                </h:form>
            </div> 
        </ui:define>
    </ui:composition>
</html>